package com.oocl.main;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

import com.oocl.messagelistener.MsgListener;

public class ServerStartup {
    public static void main(String[] args) {
    	try {
			ServerSocket server=new ServerSocket(8889);
			System.out.println("Entry-Server start ...");
			while(true){
				Socket socket = server.accept();
				MsgListener msl=new MsgListener(socket);
				new Thread(msl).start();
				Thread.sleep(1000);
			}
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
